<Application x:Class="ThScoreFileConverter.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:sys="clr-namespace:System;assembly=mscorlib"
             xmlns:vm="clr-namespace:ThScoreFileConverter.ViewModels"
             xmlns:v="clr-namespace:ThScoreFileConverter.Views"
             Exit="App_Exit"
             Startup="App_Startup">
    <Application.Resources>

        <FontFamily x:Key="FontFamilyKey">Meiryo</FontFamily>
        <sys:Double x:Key="FontSizeKey">12</sys:Double>

        <Style x:Key="WindowStyleKey"
               BasedOn="{StaticResource {x:Type Window}}"
               TargetType="{x:Type Window}">
            <Setter Property="Background"
                    Value="#FFEEEEEE"/>
            <Setter Property="FontFamily"
                    Value="{DynamicResource FontFamilyKey}"/>
            <Setter Property="FontSize"
                    Value="{DynamicResource FontSizeKey}"/>
        </Style>
        <Style x:Key="DialogStyleKey"
               BasedOn="{StaticResource WindowStyleKey}"
               TargetType="{x:Type Window}">
            <Setter Property="ResizeMode"
                    Value="NoResize"/>
            <Setter Property="ShowInTaskbar"
                    Value="False"/>
            <Setter Property="SizeToContent"
                    Value="WidthAndHeight"/>
        </Style>
        <Style x:Key="HorizontalStackPanelStyle"
               TargetType="{x:Type StackPanel}">
            <Style.Resources>
                <Style TargetType="Separator">
                    <Setter Property="Margin"
                            Value="2,0"/>
                    <Setter Property="Opacity"
                            Value="0"/>
                </Style>
            </Style.Resources>
            <Setter Property="Orientation"
                    Value="Horizontal"/>
        </Style>
        <Style x:Key="VerticalStackPanelStyle"
               TargetType="{x:Type StackPanel}">
            <Style.Resources>
                <Style TargetType="Separator">
                    <Setter Property="Margin"
                            Value="0,5"/>
                    <Setter Property="Opacity"
                            Value="0"/>
                </Style>
            </Style.Resources>
            <Setter Property="Orientation"
                    Value="Vertical"/>
        </Style>
        <Style BasedOn="{StaticResource {x:Type Button}}"
               TargetType="{x:Type Button}">
            <Setter Property="MinWidth"
                    Value="75"/>
            <Setter Property="Padding"
                    Value="5,1"/>
        </Style>
        <Style BasedOn="{StaticResource {x:Type CheckBox}}"
               TargetType="{x:Type CheckBox}">
            <Setter Property="VerticalContentAlignment"
                    Value="Center"/>
        </Style>
        <Style BasedOn="{StaticResource {x:Type GroupBox}}"
               TargetType="{x:Type GroupBox}">
            <Setter Property="Padding"
                    Value="5"/>
        </Style>

        <DataTemplate DataType="{x:Type vm:AboutWindowViewModel}">
            <v:AboutWindow/>
        </DataTemplate>
        <DataTemplate DataType="{x:Type vm:SettingWindowViewModel}">
            <v:SettingWindow/>
        </DataTemplate>

    </Application.Resources>
</Application>
